package com.zhiqianbao.utils;

/**
 * Created by 子龙 on 2017/3/24.
 */

public class ClickControlUtils {
    private long lastEvenTime = 0l;

    /**
     * 两次点击间隔是否小于参数值
     *
     * @param pulse
     *            时间间隔参数（毫秒）
     * @return
     * @auther
     */
    public boolean isEvenFastCheck(int pulse) {
        long time = System.currentTimeMillis();
        long timeD = time - lastEvenTime;
        lastEvenTime = time;
        if (0 < timeD && timeD < pulse) {
            return true;
        }
        return false;
    }

}
